<extend name="Public/base" />
<!-- 管理员用户组新增和编辑页面 -->

<block name="body">
  <div class="main-title">
    <h2>{$auth_rule['id']?'编辑':'新增'}规则</h2>
  </div>
  <form action="{:U('Rule/writeRule')}" enctype="application/x-www-form-urlencoded" method="POST"
            class="form-horizontal">
    <div class="form-item">
      <label for="auth-name" class="item-label">规则</label>
      <div class="controls">
        <input id="auth-name" type="text" name="name" class="text input-large" value="{$auth_rule.name}"/>
      </div>
    </div>
    <div class="form-item">
      <label for="auth-group" class="item-label">分组名</label>
      <div class="controls">
        <input id="auth-group" type="text" name="group" class="text input-large" value="{$auth_rule.group|default='默认分组'}"/>
      </div>
    </div>    
    <div class="form-item">
      <label for="auth-title" class="item-label">描述</label>
      <div class="controls">
        <input id="auth-title" type="text" name="title" class="text input-large" value="{$auth_rule.title}"/>
      </div>
    </div>    
       <div class="form-item">
      <label for="auth-condition" class="item-label">附加条件</label>
      <div class="controls">
        <input id="auth-condition" type="text" name="condition" class="text input-large" value="{$auth_rule.condition}"/>
      </div>
    </div> 
    <div class="form-item">
      <input type="hidden" name="id" value="{$auth_rule.id}" />
      <button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>
      <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
  </form>
</block>
<block name="script"> 
  <script type="text/javascript" charset="utf-8">
    //导航高亮
    highlight_subnav('{:U('Rule/index')}');
</script> 
</block>
